package com.ly.emp.bean.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 工单登记-dto
 *
 * @author luoyun
 * @Date: 2023-05-18
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Schema(description = "按事按人登记录入")
public class TeamResultOrderDTO {

    @Schema(description = "主键")
    private String id;

    /**
     * 录入模式：10按事 20按人 30二维表登记 40其它系统
     */
    @Schema(description = "录入模式：10按事 20按人 30二维表登记 40其它系统")
    @NotBlank(message = "录入模式不能为空")
    private String addMode;

    @Schema(description = "考核周期编码")
    @NotBlank(message = "考核周期不能为空")
    private String periodCode;

    @Schema(description = "工作类型id")
    private String workId;

    @Schema(description = "结束日期：默认当前时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date endDate;

    @Schema(description = "描述")
    private String descr;

    @Schema(description = "工号：")
    private String psnNum;

    @Schema(description = "姓名")
    private String psnName;

    @Schema(description = "组织编码")
    private String orgCode;

    @Schema(description = "组织名称")
    private String orgName;

    @Schema(description = "标准分值")
    private BigDecimal stdscore;

    @Schema(description = "工作质量积分标准")
    private String qstandard;
    // @Schema(description = "考核单位")
    // private String suitUnit;

    @Schema(description = "详情")
    @NotEmpty(message = "详情数据不能为空")
    private List<TeamResultOrderDetailDTO> details;
}
